﻿
using DataModels.Enums.ParkingLot;
using SqlSugar;
using Utils;
using static DataModels.Enums.GeneralEnum;

namespace DataModels.Entities.ParkingLot
{
    [SugarTable]
    public class ParkingSpace
    {
        [SugarColumn(IsPrimaryKey =true)]
        public Guid UUID { get; set; }

        /// <summary>
        /// 停车场UUID
        /// </summary>
        public Guid ParkingLotUUID { get; set; }

        /// <summary>
        /// 车位编号 101,A-101
        /// </summary>
        public string SpaceNumber { get; set; }

        /// <summary>
        /// 车位区域 A1,A2等
        /// </summary>
        public string Area { get; set; }

        /// <summary>
        /// 车位区域类型
        /// </summary>
        public AreaType AreaType { get; set; }

        /// <summary>
        /// 使用状态
        /// </summary>
        public Status Status { get; set; }


        public string ParkingAreaId { get; set; }

        public int? ParkingType { get; set; }


        public string ThirdParkingId { get; set; }


        public string ShareArea { get; set; }

        public int? PlaceId { get; set; }

        public int ParkingId { get; set; }
        public string Description { get; set; }


        public string ParkingName { get; set; }

        public DateTime? ExpDate { get; set; }

        public int? ObjStatus { get; set; }


        public string UseArea { get; set; }

        public DateTime? ChangeTime { get; set; }


        public string PropertyArea { get; set; }

        public DateTime? EffDate { get; set; }

        public DateTime? CreateTime { get; set; }

        public int? CustId { get; set; }

        public int? CommunityId { get; set; }

        public int? ObjType { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ParkingSpaceFullAddress
        {
            get
            {
                return $"{AreaType.GetDescription()}车位{Area}区域{SpaceNumber}号";
            }
        }
    }
}
